package com.shanglida.main;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.shanglida.R;
import com.shanglida.android.LeadActivity;
import com.shanglida.base.BaseActivity;

/**
 * @author liu
 * @deprecated 用于回写退出的界面
 * @date 2014-02-26
 * @version 1.0
 * @copyright 广州尚礼达信息科技有限公司
 * 
 */
public class SangExit extends BaseActivity {
	// 确认退出按钮 取消退出按钮
	Button Iafals, Iafays;

	/*
	 * initView初始化 initData 监听
	 */
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.exit_menu);
		initView();
		initData();
	}

	/*
	 * initData 初始化
	 */
	@Override
	protected void initData() {
		Iafals.setOnClickListener(this);
		Iafays.setOnClickListener(this);
	}

	/*
	 * initView 监听数据
	 */
	@Override
	protected void initView() {
		Iafals = (Button) findViewById(R.id.iafals);
		Iafays = (Button) findViewById(R.id.iafays);
	}

	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.iafals:
			this.finish();
			break;
		case R.id.iafays:
			Intent intent = new Intent();
			intent.setClass(SangExit.this, LeadActivity.class);
			// 注意本行的FLAG设置
			intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
			startActivity(intent);
			finish();
			break;

		default:
			break;
		}

	}

}
